package com.bigdata.demo.methods;

import com.bigdata.demo.Utils.utils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
@RestController //声明对外接口
@CrossOrigin(allowCredentials="true",allowedHeaders = "*",methods = {})
public class uploadfile {
//    private String filePath1 ="D:/photos/";
    @RequestMapping (value = "/uploadFile1",method = RequestMethod.POST)
//    @RequestMapping(value = "/testApi")
    public String uploadFile(
            @RequestParam(value = "file", required = true) MultipartFile file
    ){
        String filePath ="/home/bigdata_platform/computation";
        utils ut = new utils();
        return ut.uploadFile(file,filePath);
    }
}